package com.wwj.common.constant;

/**
 * 通用R对象以及别的通用响应码枚举类
 */
public enum CommonCodeEnum {
    NO_RETURN_DATA(10,"没有返回数据且成功"),
    RETURN_DATA(11,"有返回数据且成功"),
    UPDATE_DATA(12,"增删改数据成功"),
    ERROR(0,"错误，未知错误"),
    VALIDATION_ERROR(400,"JSR303后端校验错误"),
    PASSWORD_ACCOUNT_ERROR(401,"账号和密码错误"),
    IDENTIFY_CODE_ERROR(402,"验证码错误"),
    SUCCESS(200,"成功"),
    TOKEN_OUTDATED(444,"token已过期"),
    RTC_ERROR(44,"远程调用异常"),
    USER_NO_EXIST(403,"用户不存在"),
    EXPRESS_EXIST(405,"快递存在无法删除、修改仓位"),
    LOCATION_EXIST(407,"仓库名存在"),
    USER_EXIST(408,"用户存在，请删除其余信息再删除该用户"),
    EXPRESS_NO_EXIST(409,"快递不存在")
    ;

    private final int code;
    private final String msg;

    CommonCodeEnum(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return code;
    }
    public String getMsg(){
        return msg;
    }

}
